package bean;

import java.io.Serializable;

/*用户类*/
public class User implements Serializable {
    private String account;/*用户id,邮箱id*/
    private String psw;/*用户密码*/
    private String name;/*用户姓名*/
    private String screenName;/*用户网名*/
    private String sign;/*用户签名*/
    private int age;/*用户年龄*/
    private String sex;/*用户性别*/
    private String phone;/*用户电话*/
    private String address;/*用户地址*/
    private String birthday;/*用户生日*/
    private String email;/*用户邮件*/
    private int isAdmin;/*是否是管理员*/
    private String headPortrait;/*用户头像*/
    public User(){

    }
    public User(String id, String psw) {
        this.account = id;
        this.psw = psw;
    }
    //注册时构造方法
    public User(String id, String psw,String email,int isAdmin) {
        this.account = id;
        this.psw = psw;
        this.email=email;
        this.isAdmin=isAdmin;
    }
    //返回对象时构造方法
    public User(String account, String psw, String name, String screenName, String sign,int age, String sex, String phone, String address, String birthday, String email,int isAdmin, String headPortrait) {
        this.account = account;
        this.psw = psw;
        this.name = name;
        this.screenName = screenName;
        this.sign = sign;
        this.age=age;
        this.sex = sex;
        this.phone = phone;
        this.address = address;
        this.birthday = birthday;
        this.email = email;
        this.isAdmin=isAdmin;
        this.headPortrait = headPortrait;
    }
    //修改信息时构造方法
    public User(String account, String name, String screenName, String sign, int age,String sex, String phone, String address, String birthday, String email, String headPortrait) {
        this.account = account;
        this.name = name;
        this.screenName = screenName;
        this.sign = sign;
        this.age=age;
        this.sex = sex;
        this.phone = phone;
        this.address = address;
        this.birthday = birthday;
        this.email = email;
        this.headPortrait = headPortrait;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPsw() {
        return psw;
    }

    public void setPsw(String psw) {
        this.psw = psw;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getScreenName() {
        return screenName;
    }

    public void setScreenName(String screenName) {
        this.screenName = screenName;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getIsAdmin() {
        return isAdmin;
    }

    public void setIsAdmin(int isAdmin) {
        this.isAdmin = isAdmin;
    }

    public String getHeadPortrait() {
        return headPortrait;
    }

    public void setHeadPortrait(String headPortrait) {
        this.headPortrait = headPortrait;
    }

    @Override
    public String toString() {
        return "User{" +
                "account='" + account + '\'' +
                ", psw='" + psw + '\'' +
                ", name='" + name + '\'' +
                ", screenName='" + screenName + '\'' +
                ", sign='" + sign + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", phone='" + phone + '\'' +
                ", address='" + address + '\'' +
                ", birthday='" + birthday + '\'' +
                ", email='" + email + '\'' +
                ", isAdmin=" + isAdmin +
                ", headPortrait='" + headPortrait + '\'' +
                '}';
    }
}
